﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Serialization;
using TiPort.TiEntityObjects;
using System.IO;
using TI;

namespace TiEntityObject.Notification
{
    
    public class NotificationDocumentMeta  
    {
       
        [XmlElement("sid")]
        public string Sid { get; set; }
        
        [XmlElement("fileName")]
        public string FileName { get; set; }
        
        [XmlElement("docDescription")]
        public string DocDescription { get; set; }
        
        [XmlElement("url")]
        public string URL { get; set; }

        public bool IsDownload { get; set; }

        public bool IsIndexed { get; set; }

        public bool IsHtml { get; set; }

        public int Part { get; set; }

        public string FileExt { get {
            try
            {
                return new FileInfo(FileName).Extension;
            }
            catch
            {
                return string.Empty;
            }
        } }
      
        public string DocID{get{
                                int i =URL .IndexOf ("=");
                                return URL.Substring(i+1);
                            }}

        public TagInfo TagInfo { get; set; }
     
        [XmlElement("content")]
        public string Content { get; set; }

        public long iTransportDay { get; set; }


        }
}
